package com.samphanie.auiu.admin.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.samphanie.auiu.admin.domain.dto.AllocResourceDto;
import com.samphanie.auiu.admin.domain.vo.ResourceVo;
import com.samphanie.auiu.mbg.model.SysResource;
import com.samphanie.auiu.mbg.utils.PageUtils;

import java.util.List;
import java.util.Map;

/**
 * 资源Service接口
 *
 * @author zsy
 * @date 2021-05-18
 */
public interface ISysResourceService extends IService<SysResource> {
    /**
     * 查询资源列表
     *
     * @param query
     * @return 资源集合
     */
    List<SysResource> selectSysResourceList(Map<String, String> query);

    /**
     * 分页业务方法
     *
     * @return IPage
     */
    PageUtils listPage(Map<String, Object> query);

    List<ResourceVo> listOperationsByMenuId(Long menuId);
    boolean addResource(List<ResourceVo> operations);

    boolean allocResource(AllocResourceDto allocResourceDto);

    /**
     * 初始化资源角色规则
     */
    Map<String,List<String>> initResourceRolesMap();
}
